﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.IO;
using System.Xml.Serialization;

namespace XMLSerializerBase
{
    class Program
    {
        static void Main(string[] args)
        {
            //using auto generated classes from xsd.exe
            //Space daSpace;

            //XmlSerializer mysx = new XmlSerializer(typeof(Space));
            //FileStream xlstr = new FileStream(@"C:\Users\Chiensi\Documents\C\CarmelSoft\gbXML Project\Dec 10 Meeting\Tests\XML Files\Test Case 1 - Standard File.xml", FileMode.Open);
            //daSpace = (Space)mysx.Deserialize(xlstr);
            //xlstr.Close();

            //using (FileStream xmlStream = new FileStream(@"C:\Users\Chiensi\Documents\C\CarmelSoft\gbXML Project\Dec 10 Meeting\Tests\XML Files\Test Case 1 - Standard File.xml", FileMode.Open))
            //{
            //    using (XmlReader xred = XmlReader.Create(xmlStream))
            //    {
            //        XmlRootAttribute xR = new XmlRootAttribute();
            //        //xR.DataType = "string";
            //        xR.ElementName = "gbXML";
            //        xR.IsNullable = false;
            //        xR.Namespace = "http://www.gbxml.org/schema";


            //        XmlSerializer spaceSer = new XmlSerializer(typeof(Space));
            //        bool can = spaceSer.(xred);
            //        daSpace = (Space)spaceSer.Deserialize(xred);
            //    }
            //}

            BasicSerialization bs = new BasicSerialization();
            string filename = @"C:\Temp\Test.xml";
            bs.CreateSerial(filename);

        }
    }
}
